import React, { Component } from 'react';
// 父传子  通过属性
class Demo extends Component{
render(){
  return <h1>{this.props.msg}</h1>
}
};
class App extends Component {
  render() {
    return (
      <div>
        <Demo msg="(*^_^*)"></Demo>
      </div>
    );
  }
}

export default App;
